DBGetErr
DBGetErr Send a single data item to the data server
#include <DatabaseAccess.h> Data Access Manager
OSErr DBGetErr( sessID, err1, err2, item1, item2, errorMsg,
asyncPB);
long sessID ; is the session ID
long *err1; returns the primary error code
long *err2 ; returns the secondary error code
Str255 item1 ; describes the object of the primary error
message
Str255 item2 ; describes the object of the secondary error
message
Str255 errorMsg ; receives the error message
DBAsyncParmBlkPtr asyncPB ; is a pointer to the asynchronous parameter
block
returns Error Code; 0=no error
The DBGetErr function retrieves error codes and error messages from a
data server. You can use this function to obtain information when a low- level
function returns the result code rcDBError. If the DBState function returns
the rcDBError result code, indicating that execution of a query ended in an
error, the error information can help you debug the query. The meaning of
each error code and error message returned by this function depends on the
data server with which you are communicating; see the documentation for that
data server for more information.
sessID is the session ID that was returned by the DBInit function.
err1 returns the primary error code.
err2 returns the secondary error code.
item1 returns a string that describes the object of the primary error
message.
item2 returns a string that describes the object of the secondary error
message.
errorMsg returns the error message.
asyncPB is a pointer to the asynchronous parameter block. If you do not want
to call the function asynchronously, set this parameter to NIL.
Returns: an operating system Error Code.
noErr (0) No error
rcDBError (-802) Error receiving error information
rcDBBadSessID -(806) Session ID is invalid
rcDBAsyncNotSupp (-809) The database extension does not support asynchronous
calls
rcDBPackNotInited (-813) The InitDBPack function has not yet been called